package com.fw.system.admin.service.impl;

import java.util.List;
import com.fw.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import com.fw.common.IdXD;
import com.fw.system.admin.mapper.TbUserCityJoinMapper;
import com.fw.system.admin.domain.TbUserCityJoin;
import com.fw.system.admin.service.ITbUserCityJoinService;
import com.fw.utils.DateUtils;
/**
 * 用户和战队中间Service业务层处理
 * 
 * @author yanwei
 * @date 2023-04-04
 */
@Service
public class TbUserCityJoinServiceImpl extends ServiceImpl<TbUserCityJoinMapper, TbUserCityJoin> implements ITbUserCityJoinService
{
    @Autowired
    private TbUserCityJoinMapper tbUserCityJoinMapper;

    @Autowired
    private IdXD idXD;

    /**
     * 查询用户和战队中间
     * 
     * @param id 用户和战队中间ID
     * @return 用户和战队中间
     */
    @Override
    public TbUserCityJoin selectTbUserCityJoinById(String id)
    {
        return tbUserCityJoinMapper.selectTbUserCityJoinById(id);
    }

    /**
     * 查询用户和战队中间列表
     * 
     * @param tbUserCityJoin 用户和战队中间
     * @return 用户和战队中间
     */
    @Override
    public List<TbUserCityJoin> selectTbUserCityJoinList(TbUserCityJoin tbUserCityJoin)
    {
        return tbUserCityJoinMapper.selectTbUserCityJoinList(tbUserCityJoin);
    }

    /**
     * 新增用户和战队中间
     * 
     * @param tbUserCityJoin 用户和战队中间
     * @return 结果
     */
    @Override
    public int insertTbUserCityJoin(TbUserCityJoin tbUserCityJoin)
    {
        tbUserCityJoin.setCreateTime(DateUtils.getNowDate());
        tbUserCityJoin.setId(idXD.nextId());
        return tbUserCityJoinMapper.insertTbUserCityJoin(tbUserCityJoin);
    }

    /**
     * 修改用户和战队中间
     * 
     * @param tbUserCityJoin 用户和战队中间
     * @return 结果
     */
    @Override
    public int updateTbUserCityJoin(TbUserCityJoin tbUserCityJoin)
    {
        tbUserCityJoin.setUpdateTime(DateUtils.getNowDate());
        return tbUserCityJoinMapper.updateTbUserCityJoin(tbUserCityJoin);
    }

    /**
     * 批量删除用户和战队中间
     * 
     * @param ids 需要删除的用户和战队中间ID
     * @return 结果
     */
    @Override
    public int deleteTbUserCityJoinByIds(String[] ids)
    {
        return tbUserCityJoinMapper.deleteTbUserCityJoinByIds(ids);
    }

    /**
     * 删除用户和战队中间信息
     * 
     * @param id 用户和战队中间ID
     * @return 结果
     */
    @Override
    public int deleteTbUserCityJoinById(String id)
    {
        return tbUserCityJoinMapper.deleteTbUserCityJoinById(id);
    }
}
